package com.aplink.generic.database;

import android.database.SQLException;

import com.aplink.generic.util.LogUtil;

public class GenericSqlException extends SQLException {
    private static final long serialVersionUID = 6609622028843547400L;
    private LogUtil mLogUtil = new LogUtil( getClass() );
    private String mMessage;
    private String mAction;
    private String mDetailMessage;

    public GenericSqlException( String message, String action, SQLException e ) {
        mLogUtil.error( message, action, e );
        mMessage = message;
        mAction = action;
        mDetailMessage = e.getMessage();
    }

    public LogUtil getLogUtil() {
        return mLogUtil;
    }

    public void setLogUtil( LogUtil logUtil ) {
        mLogUtil = logUtil;
    }

    public String getMessage() {
        return mMessage;
    }

    public void setMessage( String message ) {
        mMessage = message;
    }

    public String getAction() {
        return mAction;
    }

    public void setAction( String action ) {
        mAction = action;
    }

    public String getDetailMessage() {
        return mDetailMessage;
    }

    public void setDetailMessage( String detailMessage ) {
        mDetailMessage = detailMessage;
    }

}
